<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jsx语法规则</title>
    <script src="../js/react.development.js"></script>
    <script src="../js/react-dom.development.js"></script>
    <script src="../js/babel.min.js"></script>
    <style>
        .title {
            background-color: orange;
        }
    </style>
</head>

<body>
    <div id="app"></div>
    <script type="text/babel">
        // 定义一个数据
        const data = 'Hello React'
        const VDOM = (
            <div>
                <h1 style={{color: 'white',fontSize: '45px'}} className='title'>{data}</h1>
                <h2>Hello JSX</h2>
                <input type="text" />
                {/* <peiqi>is a pig</peiqi>*/}
            </div>   
        )
        ReactDOM.render(VDOM,document.getElementById('app'))
    </script>
</body>

</html>